<?php
namespace mvc\validator;

class DateValidator extends Validator
{
    public function validate()
    {
        if(!date('Y-m-d H:i:s',strtotime($this->value))){
            $this->message = $this->attributeLabel . '为非法日期格式';
            return false;
        }
        return true;
    }

    public function getMessage()
    {
        return $this->message;
    }
}